<?php
	class Borrowbooks extends CI_Controller{			
		//借阅管理-借阅
		public function books_borrow(){
			$this->load->view("Borrowbooks/books_borrow");
		}
		//借阅管理-归还
		public function books_return(){
			$this->load->view("Borrowbooks/books_return");
		}
		//借阅人查询
		public function borrow_user(){
			$this->load->database(); 
			$this->load->model("BooksModel");
			$name = $_POST['name'];
			$data['data'] = $this->BooksModel->query_user($name);
			if($data['data']){
				$this->load->view('Borrowbooks/books_borrow',$data);	
				// var_dump($data['data']);
			}else{
				echo "<script>alert('查询失败，请重新输入')</script>";
				$this->load->view('Borrowbooks/books_borrow');
			}
		}
	}
?>